﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LotteryVote.Entity;
using System.Data.SqlClient;

namespace LotteryVote.Data
{
    public class BetResultDataAccess : DataBase
    {
        public void Insert(BetResult result)
        {
            string sql = string.Format(@"INSERT INTO {0} ({1},{2}) VALUES (@{1},@{2})", BetResult.TABLENAME, BetResult.ORDERID, BetResult.RESULT);
            base.ExecuteNonQuery(sql, new SqlParameter(BetResult.ORDERID, result.OrderId),
                new SqlParameter(BetResult.RESULT, result.Result));
        }
    }
}
